#pragma once
#include "window_impl_base.h"
#include "event_loop_impl_base.h"
#include "render_control_opengl_impl_base.h"
#include "render_control_software_impl_base.h"

#define TPL_PROTOTYPE(type) \
	template<> \
	type##_base *create_widget_base<type##_base>();

#define IMPL_WIDGET(type, api) \
	template<> \
	type##_base *create_widget_base<type##_base>(){	\
		return new krryn::system_imp::type##_##api(); \
	} 

namespace krryn{
namespace gui{
	template<typename _Type>
	_Type *create_widget_base(){
		throw std::exception("Not implemented");
	}

	TPL_PROTOTYPE(window_impl);
	TPL_PROTOTYPE(render_control_opengl_impl);
	TPL_PROTOTYPE(render_control_software_impl);
	TPL_PROTOTYPE(event_loop_impl);
}
}
